Skip to main content

Lookup Data Table

AutomatR.DefaultActivities.Datatable.LookupDataTable

The "Lookup Data Table" activity in AutomatR enables you to search for a specific value within a designated DataTable. This activity simplifies the process of locating a value and retrieving information about its location within the DataTable.

Properties

NameDescription
Input
Data TableSpecifies the DataTable variable that requires a lookup operation. Variable or argument containing the DataTable.
Lookup ValueSpecifies the value that needs to be searched for in the DataTable. String variable or argument containing the lookup value.
Lookup Column
Column IndexSpecifies the index of the column you want to search for. Nullable integer variable or argument.
Column NameSpecifies the name of the column you want to search for. String variable or argument.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variable or argument containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Lookup Data Table" activity. This can be useful for handling synchronization issues. Integer variable or argument containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
Cell ValueOutputs the value found in the cell that has the specified row and column coordinates. String variable to store the cell value. If the value is not found, the variable remains empty.
Row IndexOutputs the row index for the found cell. Integer variable to store the row index. If the value is not found, -1 is returned.
Target Column
Column IndexSpecifies the index of the target column. Nullable integer variable or argument.
Column NameSpecifies the name of the target column. String variable or argument.

How to use:

  1. Drag and drop the "Lookup Data Table" activity onto the workflow.
  2. Configure the properties by specifying the DataTable, lookup value, and either the column index or column name for the lookup.
  3. Optionally, configure the target column index or name, and customize the display name.
  4. Execute the workflow to perform the lookup operation, and the result will be stored in the specified variables.

Example: Consider an example where the "Lookup Data Table" activity is used to find the row index and cell value of a specific item in a DataTable:

Lookup Data Table:
Display Name: "Search for Item"
Data Table: dataTableVariable
Lookup Value: "Item123"
Column Name: "ItemID"
Target Column Name: "ItemName"
Row Index: rowIndexVariable
Cell Value: itemNameVariable

In this example, the activity searches for the value "Item123" in the "ItemID" column of the DataTable "dataTableVariable." The row index where the value is found is stored in the variable "rowIndexVariable," and the corresponding value from the "ItemName" column is stored in the variable "itemNameVariable." If the value is not found, the row index is set to -1.